package com.aiit.service;

import com.aiit.pojo.Role;
import com.aiit.pojo.User;
import com.aiit.vo.PageResultVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: LuTao
 * @Date: 2022/05/04/8:59
 */
public interface UserService extends IService<User> {
    //注册
    void register(User user);
    //通过用户名发现角色
    List<Role> findRolesByUsername(@Param("username") String username);
    //根据条件分页查询用户
    PageResultVo<User> getByCondition(Long page, Long limit, String username, String role, String locked, String startTime, String endTime);
    //添加用户
    void saveUser(User user, String[] role);
     //更新用户
    void updateUser(User user, String[] role);
    //删除用户
    void deleteUser(String id);

}
